﻿using ConfExpert.Forms.Base;
using ConfExpert.Utility;
using DevTeam;

using System;
namespace ConfExpert.Forms.Depo._7C
{
    public partial class KumasVeModel : XForm
    {
        int CKBatchId = -1;
        public KumasVeModel(int ckBatchId)
        {
            InitializeComponent();

            this.CKBatchId = ckBatchId;
            this.Text += "- " + AppSession.Lookups.CKBatch.FindByCKBatchId(CKBatchId).Notes;
        }

        private void KumasVeModel_Load(object sender, EventArgs e)
        {

            gv1.Init("Get7cKumasVeModel", CKBatchId);
            gv1.AddDetailGrid(gv2, "ProductId");

            gv1.FormatAsNumber(1, "QtyAx", "QtyGx", "TotalQty");
            gv2.FormatAsNumber(1, "QtyAx", "QtyGx", "TotalQty");
            gv2.FormatAsNumber(0, "GomlekAdedi", "CikanAdet");
            gv1.AddSummary("QtyAx", "QtyGx", "TotalQty");
            gv2.AddSummary("QtyAx", "QtyGx", "TotalQty", "GomlekAdedi", "CikanAdet");
            splitContainerControl2.AutoSize();

            gv1.BestFitColumns();
            gv2.BestFitColumns();
        }
    }
}
